FROM debian:11
LABEL maintainer="Caden"

RUN echo "deb http://mirrors.aliyun.com/debian bullseye main" > /etc/apt/sources.list \
    && echo "deb http://mirrors.aliyun.com/debian-security bullseye-security main" >> /etc/apt/sources.list \
    && echo "deb http://mirrors.aliyun.com/debian bullseye-updates main" >> /etc/apt/sources.list \
    && apt-get update \
    && apt-get install -y python3 python3-pip git sshpass wget \
    && pip3 install ansible -i https://pypi.tuna.tsinghua.edu.cn/simple \
    && mkdir -p /etc/ansible \
    && printf "[defaults]\nhost_key_checking = False\ntimeout = 600\n" > /etc/ansible/ansible.cfg \
    && wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc \
    && chmod +x /usr/local/bin/mc \
    && rm -rf /var/lib/apt/lists/* /root/.cache

WORKDIR /ansible